<style xmlns="http://www.w3.org/1999/html">
    .title{
        background-color: RGB(234,234,234);
        height: 40px;
        line-height: 40px;
        display: flex;
        align-items: center;

    }
    label.required:before {
        content: '* ';
        color: red;
    }

</style>
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="title">
        <svg t="1731739400713" class="icon" viewBox="0 0 1014 1014" version="1.1"
             xmlns="http://www.w3.org/1000/svg" p-id="4144" width="40" height="40">
            <path d="M554.6 960.1h-157c-17.5 0-50-11.5-50-50v-795c0-17.5 11.5-50 50-50h157.1c17.5 0 50 11.5 50 50v795.1c-0.1 17.4-11.6 49.9-50.1 49.9z"
                  p-id="4145" fill="#d41e06"></path>
        </svg>
        <p style="font-size: 18px;">基础信息</p>
    </div>
    <!--    <div class="form-group" style="padding-top:10px;">-->
    <!--        <label class="control-label col-xs-12 col-sm-2">{:__('Shop_id')}:</label>-->
    <!--        <div class="col-xs-12 col-sm-8">-->
    <!--            <input id="c-shop_id" min="0" data-rule="required" data-source="wanlshop/shop/index" data-field="shopname" class="form-control selectpage" name="row[shop_id]" type="text" value="">-->
    <!--        </div>-->
    <!--    </div>-->
    <div id="type" style="display: none;">{$row.type}</div>
    <div class="form-group" style="padding-top:10px;">
        <label class="required control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select  id="c-type" class="form-control selectpicker" name="row[type]" disabled>
                {foreach name="typeList" item="vo"}
                <option value="{$key}" {in name="key" value="row[type]"}selected{/in}>{$vo}</option>
                {/foreach}

            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="required control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text" value="{$row.name}">
        </div>
    </div>
    <!-- <div class="form-group">
        <label class="required control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-category_id" min="0" data-rule="required" data-source="wanlshop/flag"  class="form-control selectpage" name="row[category_id]" type="text" value="{$row.category_id}">
        </div>
    </div> -->
    <div class="form-group" id="consu">
        <label class="control-label col-xs-12 col-sm-2">{:__('Consumption')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div id="card">
                {if condition="$row.consumption eq 1"}
                <input  type = "radio"  name = "row[consumption]"  value = "1" checked/>按项目售价比例均摊
                {/if}
                {if condition="$row.consumption neq 1"}
                <input  type = "radio"  name = "row[consumption]"  value = "1" />按项目售价比例均摊
                {/if}
                {if condition="$row.consumption eq 2"}
                <input  type = "radio"  name = "row[consumption]" style="margin-left: 30px" value = "2"  checked/>按自定义耗卡金额消耗
                {/if}
                {if condition="$row.consumption neq 2"}
                <input  type = "radio"  name = "row[consumption]" style="margin-left: 30px" value = "2"  />按自定义耗卡金额消耗
                {/if}

            </div>
            <div id="recharge">
                {if condition="$row.consumption neq 3"}
                <input  type = "radio"  name = "row[consumption]"  value = "3"  />先消耗本金再消耗赠金
                {/if}
                {if condition="$row.consumption eq 3"}
                <input  type = "radio"  name = "row[consumption]"  value = "3"  checked/>先消耗本金再消耗赠金
                {/if}
                {if condition="$row.consumption eq 4"}
                <input  type = "radio"  name = "row[consumption]" style="margin-left: 30px"  value = "4"  checked/>先消耗赠金再消耗本金
                {/if}
                {if condition="$row.consumption neq 4"}
                <input  type = "radio"  name = "row[consumption]" style="margin-left: 30px"  value = "4"  />先消耗赠金再消耗本金
                {/if}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.price}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('会员价格')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-vip_price" class="form-control" step="0.01" name="row[vip_price]" type="number" value="{$row.vip_price}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">购卡权益:</label>
        <div class="col-xs-12 col-sm-8">
            <notempty name="buy">
                <table class="table">
                    <thead>
                    <tr>
                        <th scope="col">已选服务</th>
                        <th scope="col">规格</th>
                        <th scope="col">售价</th>
                        <th scope="col">可用次数</th>
                    </tr>
                    </thead>
                    <tbody>
                        {volist name="buy" id="data"}
                    <tr>
                        <td> {$data.title}</td>
                        <td>{$data.difference}</td>
                        <td>{$data.price}</td>
                        <td>{$data.total}</td>
                    </tr>
                        {/volist}
                    </tbody>
                </table>
            </notempty>
<!--            <a class="btn btn-primary" href="#" id="addGoods">添加商品</a>-->
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">赠送权益:</label>
        <div class="col-xs-12 col-sm-8">
            <notempty name="send">
                <table class="table">
                    <thead>
                    <tr>
                        <th scope="col">已选服务</th>
                        <th scope="col">规格</th>
                        <th scope="col">售价</th>
                        <th scope="col">可用次数</th>
                    </tr>
                    </thead>
                    <tbody>
                    {volist name="send" id="data"}
                    <tr>
                        <td> {$data.title}</td>
                        <td>{$data.difference}</td>
                        <td>{$data.price}</td>
                        <td>{$data.total}</td>
                    </tr>
                    {/volist}
                    </tbody>
                </table>
            </notempty>
<!--            <a class="btn btn-primary" href="#" id="addSendGoods">添加商品</a>-->
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Validity')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div>
                {if condition="$row.validity eq 0"}
                <input  type = "radio"  name = "row[validity]"  value = "0" checked/>永久有效
                {/if}
                {if condition="$row.validity neq 0"}
                <input  type = "radio"  name = "row[validity]"  value = "0" />永久有效
                {/if}

            </div>
            <br>
            <div style="height: 30px; line-height: 30px">

                {if condition="$row.validity eq 1"}
                <input  type = "radio"  name = "row[validity]"  value = "1" checked/>
                <input class="form-control datetimepicker" style="width: 150px;" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" type="text"  name="row[time]" placeholder="请选择时间" value="{$row.time|date='Y-m-d H:i:s',###}"> 前有效
                {/if}
                {if condition="$row.validity neq 1"}
                <input  type = "radio"  name = "row[validity]"  value = "1" />
                <input class="form-control datetimepicker" style="width: 150px;" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" type="text"  name="row[time]" placeholder="请选择时间"> 前有效
                {/if}

            </div>
            <br>
            <div style="height: 30px; line-height: 30px">

                {if condition="$row.validity eq 2"}
                <input  type = "radio"  name = "row[validity]"  value = "2" checked/> 购买后
                <input class="form-control" style="width: 150px;"  type="number"  name="row[day]" value="{$row.day}">天有效
                {/if}
                {if condition="$row.validity neq 2"}
                <input  type = "radio"  name = "row[validity]"  value = "2"/> 购买后
                <input class="form-control" style="width: 150px;"  type="number"  name="row[day]">天有效
                {/if}

            </div>
            <br>
            <div style="height: 30px; line-height: 30px">
                {if condition="$row.validity eq 3"}
                    <input  type = "radio"  name = "row[validity]"  value = "3" checked/> 首次使用
                    <input class="form-control" style="width: 150px;"  type="number"  name="row[use_day]" value="{$row.use_day}">天有效
                {/if}
                {if condition="$row.validity neq 3"}
                <input  type = "radio"  name = "row[validity]"  value = "3"/> 首次使用
                <input class="form-control" style="width: 150px;"  type="number"  name="row[use_day]">天有效
                {/if}
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Stock')}:</label>
        <div class="col-xs-12 col-sm-8">
            {if condition="$row.stock eq 0"}
                <input  type = "radio"  name = "row[stock]"  value = "0"  checked = "checked"  />全部门店
            {/if}
            {if condition="$row.stock neq 0"}
            <input  type = "radio"  name = "row[stock]"  value = "0"    />全部门店
            {/if}
            {if condition="$row.stock eq 2"}
            <input  type = "radio"  name = "row[stock]"  value = "2"  checked = "checked"  />指定门店
            {/if}
            {if condition="$row.stock neq 2"}
            <input  type = "radio"  name = "row[stock]"  value = "2"    />指定门店
            {/if}
            {if condition="$row.stock eq 3"}
            <input  type = "radio"  name = "row[stock]"  value = "3"  checked = "checked"  />仅售卡门店可用
            {/if}
            {if condition="$row.stock neq 3"}
            <input  type = "radio"  name = "row[stock]"  value = "3"    />仅售卡门店可用
            {/if}

        </div>
    </div>
    <div id="stock" style="display: none;">{$row.stock}</div>
    <div class="form-group" id="shop">
        <label class="control-label col-xs-12 col-sm-2">{:__('Shop_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-shop_ids" data-rule="required" data-source="wanlshop/shop/index" data-field="shopname" data-multiple="true" class="form-control selectpage" name="row[shop_ids]" type="text"  value="{$row.shop_ids}">
        </div>
    </div>
    <div class="title" style="margin-bottom: 10px;">
        <svg t="1731739400713" class="icon" viewBox="0 0 1014 1014" version="1.1"
             xmlns="http://www.w3.org/1000/svg" p-id="4144" width="40" height="40">
            <path d="M554.6 960.1h-157c-17.5 0-50-11.5-50-50v-795c0-17.5 11.5-50 50-50h157.1c17.5 0 50 11.5 50 50v795.1c-0.1 17.4-11.6 49.9-50.1 49.9z"
                  p-id="4145" fill="#d41e06"></path>
        </svg>
        <p style="font-size: 18px;">其他信息</p>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Activity')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                {foreach name="activityList" item="vo"}
                <label for="row[activity]-{$key}"><input id="row[activity]-{$key}" name="row[activity]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>
        </div>
    </div>

    <div class="title" style="margin-bottom: 10px;">
        <svg t="1731739400713" class="icon" viewBox="0 0 1014 1014" version="1.1"
             xmlns="http://www.w3.org/1000/svg" p-id="4144" width="40" height="40">
            <path d="M554.6 960.1h-157c-17.5 0-50-11.5-50-50v-795c0-17.5 11.5-50 50-50h157.1c17.5 0 50 11.5 50 50v795.1c-0.1 17.4-11.6 49.9-50.1 49.9z"
                  p-id="4145" fill="#d41e06"></path>
        </svg>
        <p style="font-size: 18px;">卡片样式</p>
    </div>
    <div class="col-sm-7">
        <div id="specs" style="display: none">{$row.specs}</div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Specs')}:</label>
            <div class="col-xs-12 col-sm-8">
                {foreach name="specsList" item="vo"}
                <label for="row[specs]-{$key}"><input id="row[specs]-{$key}" name="row[specs]" type="radio" value="{$key}" {in name="key" value="$row.specs"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>
        </div>
        <div class="form-group" id="back">
            <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
            <div class="col-xs-12 col-sm-8">
                <div class="input-group">
                    <input id="c-image" class="form-control" size="50" name="row[image]" type="text" value="{$row.image}">
                    <div class="input-group-addon no-border no-padding">
                        <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                        <!--                        <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>-->
                    </div>
                    <span class="msg-box n-right" for="c-image"></span>
                </div>
                <ul class="row list-inline faupload-preview" id="p-image"></ul>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Distribution')}:</label>
            <div class="col-xs-12 col-sm-8">

                {foreach name="distributionList" item="vo"}
                <label for="row[distribution]-{$key}"><input id="row[distribution]-{$key}" name="row[distribution]" type="radio" value="{$key}" {in name="key" value="row.distribution"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Flag')}:</label>
            <div class="col-xs-12 col-sm-8">

                <select  id="c-flag" class="form-control selectpicker" multiple="" name="row[flag][]">
                    {foreach name="flagList" item="vo"}
                    <option value="{$key}" {in name="key" type="radio" value="$row.flag"}selected{/in}>{$vo}</option>
                    {/foreach}
                </select>

            </div>
        </div>
    </div>
    <div class="col-sm-4" style="background: RGB(234,234,234);padding-bottom: 10px;">
        <p>当前样式预览</p>
        <img src="/uploads/20241205/a2fae77dfd38a28367abfd9bb29296dc.png" alt="" width="100%">
    </div>



    <!--    <div class="form-group">-->
    <!--        <label class="control-label col-xs-12 col-sm-2">{:__('Gift')}:</label>-->
    <!--        <div class="col-xs-12 col-sm-8">-->
    <!--            <input id="c-gift" class="form-control" step="0.01" name="row[gift]" type="number">-->
    <!--        </div>-->
    <!--    </div>-->
    <!--    <div class="form-group">-->
    <!--        <label class="control-label col-xs-12 col-sm-2">{:__('Spent')}:</label>-->
    <!--        <div class="col-xs-12 col-sm-8">-->
    <!--            <input id="c-spent" class="form-control" name="row[spent]" type="number" value="0">-->
    <!--        </div>-->
    <!--    </div>-->
    <!--    <div class="form-group">-->
    <!--        <label class="control-label col-xs-12 col-sm-2">{:__('Total')}:</label>-->
    <!--        <div class="col-xs-12 col-sm-8">-->
    <!--            <input id="c-total" class="form-control" name="row[total]" type="number" value="0">-->
    <!--        </div>-->
    <!--    </div>-->

    <!--    <div class="form-group" >-->
    <!--        <label class="control-label col-xs-12 col-sm-2">{:__('Validitytime')}:</label>-->
    <!--        <div class="col-xs-12 col-sm-8">-->
    <!--            <input id="c-validitytime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[validitytime]" type="text" value="{:date('Y-m-d H:i:s')}">-->
    <!--        </div>-->
    <!--    </div>-->


    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Activity_type')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select  id="c-activity_type" class="form-control selectpicker" name="row[activity_type]">
                {foreach name="activityTypeList" item="vo"}
                    <option value="{$key}" {in name="key" value="goods"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div> -->
    <!--    <div class="form-group">-->
    <!--        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>-->
    <!--        <div class="col-xs-12 col-sm-8">-->
    <!--            -->
    <!--            <div class="radio">-->
    <!--            {foreach name="statusList" item="vo"}-->
    <!--            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="normal"}checked{/in} /> {$vo}</label> -->
    <!--            {/foreach}-->
    <!--            </div>-->

    <!--        </div>-->
    <!--    </div>-->
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
